<%--
  Created by IntelliJ IDEA.
  User: 86188
  Date: 2023/6/6
  Time: 11:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>记事本登录</title>
    <link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css"  >
</head>
<body>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/login.js"></script>
<form id="loginForm" action="${pageContext.request.contextPath}/login" method="post">
    <table>
        <thead>
        <tr>
            <th colspan="2">个人记账本</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td colspan="2">
                <label for="userId">用户id:</label>
                <input type="text" name="userId" id="userId" placeholder="输入id">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <label for="loginPassword">密码:</label>
                <input type="password" name="loginPassword" id="loginPassword" placeholder="输入密码">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <label for="loginCode">验证码: </label>
                <input type="text" name="loginCode" id="loginCode" placeholder="输入验证码"/>
            </td>
        </tr>
        <tr>
            <td>
                <img id="exchangeCode" src="${pageContext.request.contextPath}/VerifyCodeServlet" alt="图片加载失败">
            </td>
            <td>
                <a id="eCode" href="#">看不清？换一张图片</a>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="提交" onclick="return login()">
            </td>
            <td>
                <input type="reset" value="重置">
            </td>
        </tr>
        </tbody>
        <tfoot>
        <tr>
            <td colspan="2">
                没有账号？点击<a href="${pageContext.request.contextPath}/register">这里</a>注册吧！
            </td>
        </tr>
        <tr>
            <td id="errorMessage" class="errorMessage" colspan="2">
                ${errorMsg}
            </td>
        </tr>
        </tfoot>
    </table>
</form>
</body>
</html>
